<!DOCTYPE html>
<html>
<head>
    <title>video.js支持hls直播实例</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <meta name="wap-font-scale" content="no">
    <link href="/demo/videojs/video.css?v=bcd2ce1385" rel="stylesheet">

    <style>#roomVideo {width: 600px; height: 300px; margin:200px auto;}</style>

</head>
<body>

<video id="roomVideo" class="video-js vjs-default-skin vjs-big-play-centered"
       preload="auto"
       controls
       playsinline
       x-webkit-airplay="allow"
       webkit-playsinline
       x5-video-player-type="h5"
       x5-video-player-fullscreen="true"
       poster="/thumb.jpg">
    <source src="{$m3u8}"  type="application/x-mpegURL">
</video>

<script src="/demo/videojs/video.js?v=fc5104a2ab23"></script>
<script src="/demo/videojs/videojs-flash.js?v=c726b94b9923"></script>
<script src="/demo/videojs/videojs-contrib-hls.js?v=c726b94b9923"></script>

<script>
    var myvideo = videojs("roomVideo");

    myvideo.play();

    // 100秒处开始播放
    // myvideo.currentTime(100);


    myvideo.ready(function(){
        // 在ready中显示NaN
        // console.log(this.duration());
    });

    console.log(myvideo.volume());

    // 获取声音
    console.log(myvideo.volume());
    // 设置声音
    // myvideo.volume(.5);

    // 获取宽高
    console.log(myvideo.width());
    console.log(myvideo.height());
</script>

</body>
</html>